import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

const app = createApp(App)

app.use(createPinia())
app.use(router)

app.directive('edit', {
    mounted: (el, binging) => {
        console.log(binging.value);
        const { key, permiss } = binging.value
        if (!permiss[key]) {
            el.style.display = 'none'
        }
        else {
            el.style.display = 'block'
        }
    }
})

app.mount('#app')
